package com.zd.service;

import java.util.List;

import com.zd.dto.Exposer;
import com.zd.dto.SeckillExecution;
import com.zd.entity.Seckill;
import com.zd.exception.RepeatKillException;
import com.zd.exception.SeckillCloseExecption;
import com.zd.exception.SeckillExecption;

public interface SeckillService {
	/**
	 * 查询所有秒杀商品
	 * @return
	 */
	List<Seckill> getSeckillList();
	/**
	 * 通过Id查询单个秒杀商品
	 * @param seckillId
	 * @return
	 */
	Seckill getById(long seckillId);
	/**
	 * 秒杀开启时输出秒杀接口，否则输出系统时间和秒杀时间
	 * @param seckillId
	 */
	Exposer exportSeckillUrl(long seckillId);
	/**
	 * 执行秒杀操作
	 * @param seckillId
	 * @param userPhone
	 * @param md5
	 */
	SeckillExecution executeSeckill(long seckillId,long userPhone,String md5) 
			throws SeckillExecption,RepeatKillException,SeckillCloseExecption;
}
